require(['jquery','window'], function ($, w) {
    $('#a1').click(function () {
        var win =new w.Window();
        win.alert({
            content:'welcome',
            handler4AlertBtn:function(){
                alert('alert1');
            },
            y:100,
            width:500,
            height:300,
            hasCloseBtn:true,
            dragHandle:".window_header"
        }).on('alert',function(){
            alert('alert2')
        });
    });

    $('#a2').click(function () {
        var win =new w.Window();
        win.confirm({
            title:'系统消息',
            content:'你确定要删除这个文件？',
            y:100,
            width:500,
            height:300,
            hasCloseBtn:true,
            text4ConfirmBtn:'是',
            text4CancelBtn:'否',
            dragHandle:".window_header"
        }).on('cancel',function(){
            alert('取消');
        }).on('confirm',function(){
            alert('确定');
        });
    });

    $('#a3').click(function () {
        var win =new w.Window();
        win.prompt({
            title:'请输入你的名字',
            content:'我们将会为你保密你输入的信息',
            y:100,
            width:500,
            height:300,
            hasCloseBtn:true,
            text4PromptBtn:'输入',
            text4CancelBtn:'取消',
            dragHandle:".window_header",
            defaultValue4PromptInput:'张三'
        }).on('prompt',function(inputValue){
            alert('你输入的内容是：'+ inputValue);
        }).on('cancel',function(){
            alert('取消');
        });
    });


    $('#a4').click(function () {
        var win =new w.Window();
        win.common({
            content:'我是一个通用弹窗',
            width:300,
            height:150,
            hasCloseBtn:true
        });
    })

});